package com.letoken.platform.repo.sss.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户资产表
 * </p>
 *
 * @author 作者
 * @since 2024-09-05
 */
@Getter
@Setter
@TableName("app_user_wallet")
@ApiModel(value = "AppUserWallet对象", description = "用户资产表")
public class AppUserWallet extends Model<AppUserWallet> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("币种id")
    @TableField("token_id")
    private Integer tokenId;

    @ApiModelProperty("可用余额")
    @TableField("available_balance")
    private BigDecimal availableBalance;

    @ApiModelProperty("冻结余额")
    @TableField("freeze_balance")
    private BigDecimal freezeBalance;

    @ApiModelProperty("待释放余额")
    @TableField("released_balance")
    private BigDecimal releasedBalance;

    @ApiModelProperty("版本号")
    @TableField("version")
    private Integer version;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
